
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <script src="../../js/vue.js"></script>
    <link rel="stylesheet" href="../../element-ui/lib/theme-chalk/index.css">
    <link rel="stylesheet" href="../../plugins/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="../../plugins/ionicons/css/ionicons.min.css">
    <link rel="stylesheet" href="../../plugins/iCheck/square/blue.css">
    <link rel="stylesheet" href="../../plugins/morris/morris.css">
    <link rel="stylesheet" href="../../plugins/jvectormap/jquery-jvectormap-1.2.2.css">
    <link rel="stylesheet" href="../../plugins/datepicker/datepicker3.css">
    <link rel="stylesheet" href="../../plugins/daterangepicker/daterangepicker.css">
    <link rel="stylesheet" href="../../plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
    <link rel="stylesheet" href="../../plugins/datatables/dataTables.bootstrap.css">
    <link rel="stylesheet" href="../../plugins/treeTable/jquery.treetable.css">
    <link rel="stylesheet" href="../../plugins/treeTable/jquery.treetable.theme.default.css">
    <link rel="stylesheet" href="../../plugins/select2/select2.css">
    <link rel="stylesheet" href="../../plugins/colorpicker/bootstrap-colorpicker.min.css">
    <link rel="stylesheet" href="../../plugins/bootstrap-markdown/css/bootstrap-markdown.min.css">
    <link rel="stylesheet" href="../../plugins/adminLTE/css/AdminLTE.css">
    <link rel="stylesheet" href="../../plugins/adminLTE/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="../../css/style.css">
    <link rel="stylesheet" href="../../plugins/ionslider/ion.rangeSlider.css">
    <link rel="stylesheet" href="../../plugins/ionslider/ion.rangeSlider.skinNice.css">
    <link rel="stylesheet" href="../../plugins/bootstrap-slider/slider.css">
    <link rel="stylesheet" href="../../plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.css">

    <script src="../../element-ui/lib/index.js"></script>
    <script src="../../js/axios-0.18.0.js"></script>

</head>
<style>


</style>

<body>
    <div id="app">

        <h4 style="padding-top:20px;font-weight: bold ;padding-left: 30px"><i class="el-icon-files"></i>标题</h4>

        <el-input style="padding-top:5px;font-weight: bold ;padding-left: 30px; width: 800px"
                placeholder="请勿超过30个字符"
                v-model="input"
                clearable>
        </el-input>

        <h4 style="padding-top:20px;font-weight: bold ;padding-left: 30px"><i class="el-icon-question"></i>问题页面</h4>

        <el-input style="padding-top:5px;font-weight: bold ;padding-left: 30px; width: 800px"
                  placeholder="如:最佳读者页面"
                  v-model="text"
                  clearable>
        </el-input>

        <h4 style="padding-top:20px;font-weight: bold ;padding-left: 30px"><i class="el-icon-edit"></i>问题描述</h4>

        <el-input style="padding-top:5px;font-weight: bold ;padding-left: 30px; width: 800px; "
                  :autosize="{ minRows: 2, maxRows: 8}"
                  placeholder="请勿超过256个字符"
                  type="textarea"
                  v-model="textarea"
                  clearable>
        </el-input>

        <h4 style="padding-top:20px;font-weight: bold ;padding-left: 30px"><i class="el-icon-phone-outline"></i>联系方式</h4>

        <el-input style="padding-top:5px;font-weight: bold ;padding-left: 30px; width: 800px"
                  placeholder="电话/邮箱"
                  v-model="phone"
                  clearable>
        </el-input>

        <div style="padding-top:20px;font-weight: bold ;padding-left: 30px">
            <el-button round type="primary" plain v-on:click="submit">提交</el-button>
            <i class="el-icon-d-arrow-right"></i>
            <a href="my_feedback.html">我的反馈</a>
        </div>

    </div>
</body>

<script>
    new Vue({
        el:"#app",
        data() {
            return {
                input: '',
                text:'',
                textarea:'',
                phone:''
            }
        },
        mounted(){

        },
        methods:{
            submit(){
                var _this=this;
                if (_this.input==""||_this.text==""||_this.textarea==""||_this.phone==""){
                    this.$message.error('请输入正确的信息!')
                }else{
                    var aa={
                        "title":_this.input,
                        "problem_page":_this.text,
                        "problem_description":_this.textarea,
                        "phone":_this.phone
                    };
                    var s = JSON.stringify(aa);
                    axios({
                        method:"post",
                        url:"http://localhost:8080/web/submitProblem",
                        data:s
                    }).then(function (reps){
                        var i=reps.data;
                        if (i==1){
                            location.href="my_feedback.html"
                        }
                    })
                }
            }
        }
    })


</script>


</html>